# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactImageRequest do
  @moduledoc """
  Request to search for potentially sensitive info in an image and redact it by covering it with a colored rectangle.

  ## Attributes

  *   `byteItem` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ByteContentItem.t`, *default:* `nil`) - The content must be PNG, JPEG, SVG or BMP.
  *   `imageRedactionConfigs` (*type:* `list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageRedactionConfig.t)`, *default:* `nil`) - The configuration for specifying what content to redact from images.
  *   `includeFindings` (*type:* `boolean()`, *default:* `nil`) - Whether the response should include findings along with the redacted image.
  *   `inspectConfig` (*type:* `GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InspectConfig.t`, *default:* `nil`) - Configuration for the inspector.
  *   `locationId` (*type:* `String.t`, *default:* `nil`) - Deprecated. This field has no effect.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :byteItem => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ByteContentItem.t() | nil,
          :imageRedactionConfigs =>
            list(GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageRedactionConfig.t()) | nil,
          :includeFindings => boolean() | nil,
          :inspectConfig => GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InspectConfig.t() | nil,
          :locationId => String.t() | nil
        }

  field(:byteItem, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ByteContentItem)

  field(:imageRedactionConfigs,
    as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2ImageRedactionConfig,
    type: :list
  )

  field(:includeFindings)
  field(:inspectConfig, as: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2InspectConfig)
  field(:locationId)
end

defimpl Poison.Decoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactImageRequest do
  def decode(value, options) do
    GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactImageRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DLP.V2.Model.GooglePrivacyDlpV2RedactImageRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
